Skip to content

fix: strip unsupported flex tier for openai oauth codex#1739

Open
mci77777 wants to merge 1 commit intoWei-Shaw:mainfrom
mci77777:fix/openai-oauth-flex-service-tier
Open

fix: strip unsupported flex tier for openai oauth codex#1739
mci77777 wants to merge 1 commit intoWei-Shaw:mainfrom
mci77777:fix/openai-oauth-flex-service-tier

Conversation

@mci77777
Copy link
Copy Markdown

Summary

  • strip service_tier:flex only for OpenAI OAuth requests that go to ChatGPT Codex upstream
  • keep API key / public OpenAI Responses passthrough unchanged so flex still forwards there
  • refresh compat billing metadata from the transformed OAuth request body to avoid stale flex

Testing

  • go test ./internal/service -run "TestApplyCodexOAuthTransform_StripsUnsupportedFlexServiceTier|TestOpenAIGatewayService_OAuthPassthrough_StripsFlexServiceTierBeforeUpstream|TestForwardAsAnthropic_OAuthStripsFlexServiceTier|TestForwardAsChatCompletions_OAuthStripsFlexServiceTier" -count=1
  • go test ./internal/service -count=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant